import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

const nav = {
  state: {
    activeKey: null,
    options: [
      {
        key: "index",
        name: "环境保护",
        to: "/index"
      },
      {
        key: "airRadar",
        name: "雷达组网",
        to: "/airRadar"
      },
      {
        key: "station",
        name: "局地气象",
        to: "/station"
      },
      {
        key: "psi",
        name: "污染排查",
        to: "/psi"
      },
      {
        key: "vehicle",
        name: "作业管控",
        to: "/vehicle"
      },
      {
        key: "constructionSite",
        name: "在建工地",
        to: "/constructionSite"
      }
    ]
  },
  mutations: {
    setActiveKey(state, key) {
      state.activeKey = key;
    }
  },
  actions: {},
  getters: {}
};

export default new Vuex.Store({
  state: {},
  mutations: {},
  actions: {},
  modules: {
    nav: nav
  }
});
